https://serokell.io/blog/ghc-dependent-types-in-haskell
Check out this post by Serokell.